package com.gitee.wsl.compose.ext.resource

import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonSkippableComposable
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.graphics.vector.ImageVector
import org.jetbrains.compose.resources.DrawableResource
import org.jetbrains.compose.resources.imageResource
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.vectorResource


@Composable
@NonSkippableComposable
fun DrawableResource.vector(): ImageVector = vectorResource(this)

@Composable
@NonSkippableComposable
fun DrawableResource.painter(): Painter = painterResource(this)

@Composable
@NonSkippableComposable
fun DrawableResource.image(): ImageBitmap = imageResource(this)